﻿using System;

namespace WeDonekRpc.Client.Helper
{
    public class ContainerHelper
    {
        /// <summary>
        /// 获取当前运行程序的容器Id
        /// </summary>
        /// <returns></returns>
        public static string ContainerId()
        {
            string hostname = Environment.GetEnvironmentVariable("HOSTNAME", EnvironmentVariableTarget.Process);
            return string.IsNullOrWhiteSpace(hostname) ? string.Empty : hostname;
        }


    }
}
